package io.hots.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * @author yueshibin@cetcbigdata.com
 * @date 2022/9/5 10:00 上午
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("scan_code_mapping")
public class ScanCodeMappingEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;

    /**
     * 用户编号
     */
    private String userId;

    /**
     * 姓名
     */
    private String name;

    /**
     * 场所码
     */
    private String venueId;

    /**
     * 场所名称
     */
    private String venueName;

    /**
     * 创建时间
     */
    private Date createTime;

    public ScanCodeMappingEntity(UserEntity o, VenueEntity v) {
        this.userId = o.getUserId();
        this.name = o.getName();
        this.venueId = v.getVenueId();
        this.venueName = v.getVenueName();
        this.createTime = new Date();
    }
}
